1. Field of the Invention
The embodiments related to programming language grammar and, more particularly, to a computer-implemented method, a system and an associated program storage device for automatic incremental learning of programming language grammar.
2. Description of the Related Art
Software code is typically written in a programming language (e.g., Basic, C, C++, structured query language (SQL), etc.) and stored (e.g., in a text file). However, to execute the software code it must first be converted into a machine-readable format. To accomplish this, a parser (i.e., a syntactic analyzer) can parse the software code based on the grammar of the particular programming language. Specifically, a parsing program, generated based on a set of grammar rules which define the syntactic structure of all strings in that particular programming language, can parse the software code into a parse tree. Then, a complier can convert (i.e., translate) the parse tree into computer-executable code.
Oftentimes, however, the grammar for the particular programming language (i.e., the set of grammar rules) may be incomplete due to evolution of the programming language (i.e., changes in the programming language over time). As a result, parsing of the software code may fail. Unfortunately, manually updating the grammar can be a time-consuming and error-prone task. Thus, there is a need for a computer-implemented method, a system and an associated program storage device for automatic incremental learning of programming language grammar.